package music_store.ms.dao;

import music_store.ms.pojo.Cart;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;


@Mapper
public interface CartMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Cart record);

    int insertSelective(Cart record);

    Cart selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Cart record);

    int updateByPrimaryKey(Cart record);

    List<Cart> selectCartByUserId(Integer userId);

    int selectCartMusicCheckedStatusByUserId(Integer userId);

    Cart selectCartByUserIdAndMusicId(Integer userId, Integer musicId);

    int deleteByUserIdMusicIds(Integer userId, List<String> musicIdList);

    int checkedOrUnchecked(Integer userId, Integer checked, Integer musicId);

    List<Cart> selectCheckedCartByUserId(Integer userId);

}